package demo4;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-08-16
 * Time: 22:10
 */
public class Student implements Cloneable{
    public int age=10;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    class Test10{
    public static void main(String[] args)  {
        Student student1=new Student();
        Student student2=student1.clone();
        System.out.println(student1.age);
        System.out.println(student2.age);
    }
}